.class public Lcom/xingbook/ui/a/s;
.super Ljava/lang/Object;


# direct methods
.method public static a(IIII)Landroid/graphics/drawable/Drawable;
    .locals 9

    const/4 v8, 0x4

    const/4 v7, 0x3

    const/4 v6, 0x2

    const/4 v5, 0x1

    const/4 v4, 0x0

    const/16 v0, 0x8

    new-array v1, v0, [F

    int-to-float v0, p1

    aput v0, v1, v4

    int-to-float v0, p1

    aput v0, v1, v5

    int-to-float v0, p1

    aput v0, v1, v6

    int-to-float v0, p1

    aput v0, v1, v7

    int-to-float v0, p1

    aput v0, v1, v8

    const/4 v0, 0x5

    int-to-float v2, p1

    aput v2, v1, v0

    const/4 v0, 0x6

    int-to-float v2, p1

    aput v2, v1, v0

    const/4 v0, 0x7

    int-to-float v2, p1

    aput v2, v1, v0

    const/4 v3, 0x0

    const/4 v2, 0x0

    if-lez p3, :cond_0

    const/16 v0, 0x8

    new-array v3, v0, [F

    int-to-float v0, p1

    aput v0, v3, v4

    int-to-float v0, p1

    aput v0, v3, v5

    int-to-float v0, p1

    aput v0, v3, v6

    int-to-float v0, p1

    aput v0, v3, v7

    int-to-float v0, p1

    aput v0, v3, v8

    const/4 v0, 0x5

    int-to-float v2, p1

    aput v2, v3, v0

    const/4 v0, 0x6

    int-to-float v2, p1

    aput v2, v3, v0

    const/4 v0, 0x7

    int-to-float v2, p1

    aput v2, v3, v0

    new-instance v2, Landroid/graphics/RectF;

    int-to-float v0, p3

    int-to-float v4, p3

    int-to-float v5, p3

    int-to-float v6, p3

    invoke-direct {v2, v0, v4, v5, v6}, Landroid/graphics/RectF;-><init>(FFFF)V

    :cond_0
    new-instance v0, Lcom/xingbook/ui/a/t;

    move v4, p2

    move v5, p3

    invoke-direct/range {v0 .. v5}, Lcom/xingbook/ui/a/t;-><init>([FLandroid/graphics/RectF;[FII)V

    new-instance v1, Landroid/graphics/drawable/ShapeDrawable;

    invoke-direct {v1, v0}, Landroid/graphics/drawable/ShapeDrawable;-><init>(Landroid/graphics/drawable/shapes/Shape;)V

    invoke-virtual {v1}, Landroid/graphics/drawable/ShapeDrawable;->getPaint()Landroid/graphics/Paint;

    move-result-object v0

    invoke-virtual {v0, p0}, Landroid/graphics/Paint;->setColor(I)V

    return-object v1
.end method

.method public static a(Landroid/widget/TextView;Lcn/a/a/j;Lcom/xingbook/c/e;Landroid/content/Context;Landroid/view/View;)V
    .locals 5
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "NewApi"
        }
    .end annotation

    invoke-virtual {p1}, Lcn/a/a/j;->b()I

    move-result v0

    invoke-virtual {p0, v0}, Landroid/widget/TextView;->setTextColor(I)V

    invoke-virtual {p1}, Lcn/a/a/j;->f()F

    move-result v0

    invoke-virtual {p1}, Lcn/a/a/j;->g()F

    move-result v1

    invoke-virtual {p1}, Lcn/a/a/j;->h()F

    move-result v2

    invoke-virtual {p1}, Lcn/a/a/j;->i()I

    move-result v3

    invoke-virtual {p0, v0, v1, v2, v3}, Landroid/widget/TextView;->setShadowLayer(FFFI)V

    invoke-virtual {p1}, Lcn/a/a/j;->l()Lcn/a/a/d/k;

    move-result-object v0

    invoke-virtual {v0}, Lcn/a/a/d/k;->c()Lcn/a/a/d/f;

    move-result-object v0

    invoke-virtual {p1}, Lcn/a/a/j;->l()Lcn/a/a/d/k;

    move-result-object v1

    invoke-virtual {v1}, Lcn/a/a/d/k;->e()I

    move-result v1

    iget v2, v0, Lcn/a/a/d/f;->a:I

    add-int/2addr v2, v1

    iget v3, v0, Lcn/a/a/d/f;->b:I

    add-int/2addr v3, v1

    iget v4, v0, Lcn/a/a/d/f;->c:I

    add-int/2addr v4, v1

    iget v0, v0, Lcn/a/a/d/f;->d:I

    add-int/2addr v0, v1

    invoke-virtual {p4, v2, v3, v4, v0}, Landroid/view/View;->setPadding(IIII)V

    invoke-virtual {p0}, Landroid/widget/TextView;->getPaint()Landroid/text/TextPaint;

    move-result-object v0

    invoke-virtual {p1}, Lcn/a/a/j;->o()Z

    move-result v1

    if-eqz v1, :cond_0

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/text/TextPaint;->setFlags(I)V

    :cond_0
    invoke-virtual {p1}, Lcn/a/a/j;->m()Z

    move-result v1

    if-eqz v1, :cond_1

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/text/TextPaint;->setFakeBoldText(Z)V

    :cond_1
    invoke-virtual {p1}, Lcn/a/a/j;->a()I

    move-result v0

    invoke-virtual {p1}, Lcn/a/a/j;->c()F

    move-result v1

    float-to-int v1, v1

    invoke-virtual {p1}, Lcn/a/a/j;->d()F

    move-result v2

    float-to-int v2, v2

    invoke-static {p0, p2, v0, v1, v2}, Lcom/xingbook/ui/a/s;->a(Landroid/widget/TextView;Lcom/xingbook/c/e;III)V

    invoke-virtual {p1}, Lcn/a/a/j;->l()Lcn/a/a/d/k;

    move-result-object v0

    invoke-virtual {v0}, Lcn/a/a/d/k;->a()I

    move-result v0

    invoke-virtual {p1}, Lcn/a/a/j;->l()Lcn/a/a/d/k;

    move-result-object v1

    invoke-virtual {v1}, Lcn/a/a/d/k;->b()I

    move-result v1

    invoke-virtual {p1}, Lcn/a/a/j;->l()Lcn/a/a/d/k;

    move-result-object v2

    invoke-virtual {v2}, Lcn/a/a/d/k;->d()I

    move-result v2

    invoke-virtual {p1}, Lcn/a/a/j;->l()Lcn/a/a/d/k;

    move-result-object v3

    invoke-virtual {v3}, Lcn/a/a/d/k;->e()I

    move-result v3

    invoke-static {v0, v1, v2, v3}, Lcom/xingbook/ui/a/s;->a(IIII)Landroid/graphics/drawable/Drawable;

    move-result-object v0

    sget v1, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v2, 0x10

    if-lt v1, v2, :cond_2

    invoke-virtual {p4, v0}, Landroid/view/View;->setBackground(Landroid/graphics/drawable/Drawable;)V

    :goto_0
    invoke-virtual {p1}, Lcn/a/a/j;->e()I

    move-result v0

    invoke-virtual {p0, v0}, Landroid/widget/TextView;->setGravity(I)V

    return-void

    :cond_2
    invoke-virtual {p4, v0}, Landroid/view/View;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    goto :goto_0
.end method

.method public static a(Landroid/widget/TextView;Lcom/xingbook/c/e;III)V
    .locals 4

    const/4 v3, 0x0

    new-instance v0, Landroid/graphics/Paint;

    invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V

    int-to-float v1, p2

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextSize(F)V

    invoke-virtual {v0}, Landroid/graphics/Paint;->getFontMetrics()Landroid/graphics/Paint$FontMetrics;

    move-result-object v0

    iget v1, v0, Landroid/graphics/Paint$FontMetrics;->descent:F

    iget v0, v0, Landroid/graphics/Paint$FontMetrics;->ascent:F

    sub-float v0, v1, v0

    float-to-double v0, v0

    invoke-static {v0, v1}, Ljava/lang/Math;->ceil(D)D

    move-result-wide v0

    double-to-int v0, v0

    div-int v1, p3, v0

    rem-int v0, p3, v0

    invoke-virtual {p1}, Lcom/xingbook/c/e;->b()Z

    move-result v2

    if-eqz v2, :cond_0

    int-to-float v0, v0

    invoke-virtual {p1, v0}, Lcom/xingbook/c/e;->b(F)F

    move-result v0

    int-to-float v1, v1

    invoke-virtual {p0, v0, v1}, Landroid/widget/TextView;->setLineSpacing(FF)V

    int-to-float v0, p2

    invoke-virtual {p1, v0}, Lcom/xingbook/c/e;->a(F)F

    move-result v0

    invoke-virtual {p0, v3, v0}, Landroid/widget/TextView;->setTextSize(IF)V

    :goto_0
    return-void

    :cond_0
    int-to-float v0, v0

    int-to-float v1, v1

    invoke-virtual {p0, v0, v1}, Landroid/widget/TextView;->setLineSpacing(FF)V

    int-to-float v0, p2

    invoke-virtual {p0, v3, v0}, Landroid/widget/TextView;->setTextSize(IF)V

    goto :goto_0
.end method
